import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:sph_shipper/AppConfig/Config.dart';
import 'package:sph_shipper/Message/EnterpriseInvitationPage.dart';

class BusinessPage extends StatefulWidget {
  const BusinessPage({super.key});

  @override
  State<BusinessPage> createState() => _BusinessPageState();
}

class _BusinessPageState extends State<BusinessPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: MyColors.backgreyColor,
      body: ListView.builder(
        itemCount:3 ,
        itemBuilder: (context, index) {
      return Container(
        margin: EdgeInsets.only(left: 10.w,right: 10.w,top: 8.h),
        padding: EdgeInsets.only(left: 6.w,top: 9.h,right: 9.w,bottom: 10.h),
        decoration: BoxDecoration(
            color: Colors.white,
            borderRadius: BorderRadius.all(Radius.circular(10))),
        child:GestureDetector(
          child: Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Row(
                children: [
                  Image.network( "https://t12.baidu.com/it/u=2009860844,206760771&fm=30&app=106&f=JPEG?w=640&h=426&s=41313C722D374B925CF3F3D30300D0A9",
                    width: 36.w,height: 36.h,fit: BoxFit.cover,),
                  SizedBox(width: 8.w,),
                  Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      Text("邀请",style: TextStyle(color: Colors.black),),
                      Text("xxxx企业邀请您加入",style: TextStyle(color: MyColors.authTipColor),),
                    ],
                  ),
                ],
              ),
              Text("12:05",style: TextStyle(color: MyColors.authTipColor),),
            ],
          ),
          onTap: (){
            Navigator.push(context,
                MaterialPageRoute(builder: (context) {
                  return EnterpriseInvitationPage();
                }));
          },
        ),
      );
        }
        ),
    );
  }
}
